#include <iostream>
#include <algorithm>

using namespace std;

void selectionSort(int arrays[],int lenarray) {

	for (int i = 0;i < lenarray;i++) {

		int minindex = i;
		for (int j = i + 1;j < lenarray;j++) {
			if (arrays[j] < arrays[minindex]) {
				minindex = j;
			}
		}
		swap(arrays[i], arrays[minindex]);
	}
}

int main() {
	int arrays[10] = { 1,2,3,4,11,6,7,8,9,10 };
	selectionSort(arrays, 10);
	for (int i = 0; i < 10;i++) {
		cout << arrays[i] << ",";
	}
	cout << endl;
}